﻿<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
    <head>
        <title>微信扫一扫支付</title>

        <style type='text/css'>
            body{text-align: center;}
            .main{margin-right:auto;margin-left:auto;margin-top:120px}
            .status{color:green; font-weight:bold;display:none;}
        </style>
        <script src="/Public/static/js/jquery.js"></script>
    </head>
    <body>
        <div class="main">
            请使用微信扫一扫进行支付，二维码只在五分中内有效果
            <p id="status" class="status">恭喜您,支付成功!</p>
            <p style=""><img src="/helper/qrcode?text=<?php echo str_replace('&', '%26', $sendData['code_url']) ?>"/></p>
        </div>
        <script>
            $(function () {
                var query = function () {
                    $.get('/Member/check_order/', {'order_id': '<?php echo $_GET['order_id'] ?>', 'random': Math.random()}, function (status) {
                        if (parseInt(status) == 1) {
                            $("#status").show();
                            setTimeout(function () {
                                location.href = '/Member/package';
                            }, 1000);
                        } else {
                            setTimeout(function () {
                                query();
                            }, 1000);
                        }
                    });
                }
                query();
            })
        </script>
    </body>
</html>